package org.fight.landowner.common.util;

import com.google.common.collect.Sets;
import org.apache.commons.lang3.ClassUtils;

import java.util.HashSet;
import java.util.Map;
import java.util.Set;

/**
 * @Author wangxuehao02
 * @Date 2024/2/8 4:21 PM
 * @Description
 **/
public class ClazzUtil {
    public static final Set<Class> BASE_TYPE_SET = Sets.newHashSet(byte.class, Byte.class, short.class, Short.class, int.class, Integer.class, long.class, Long.class,
                                                            float.class, Float.class, double.class, Double.class,
                                                            char.class, Character.class,
                                                            boolean.class, Boolean.class
                                                    );

    public static boolean isBaseType(Class clazz) {
        if (clazz == null) {
            return false;
        }

        return BASE_TYPE_SET.contains(clazz);
    }
}
